/*
 * Filename    : State_Loading_Screen.java
 * Projectname : RamaShinta
 * Date        : Nov 25, 2012 , 10:33:22 AM 
 * 
 */

package com.amikomgamedev.ramashinta.state;

import com.amikomgamedev.ramashinta.Utils;

public class State_Loading_Screen extends State_Game_Win
{
	private float	time;

	protected void create_State_Loading_Screen()
	{
		graphic.attachLoadingBg();
		time = 0;
	}

	@Override
	public void onUpdate(float pSecondsElapsed)
	{
		if (State_Menu_Current == STATE_LOADING_SCREEN)
		{
			time += pSecondsElapsed;
			if (time > 5.0f)
			{
				graphic.detachLoadingBg();
				switchState(STATE_MENU_MAIN);
			}
			Utils.TRACE("time :" + time);
		}
		super.onUpdate(pSecondsElapsed);
	}

}
